﻿using System;
using System.Collections.Generic;
using Bingosoft.Core;
using Bingosoft.Core.Ioc;
using Bingosoft.Modules.SecurityConsole.Common.FunctionControl.TreeListSelect;

namespace Bingosoft.WebApp.Modules.SecurityConsole.Common.FunctionControl.TreeListSelect
{
    public partial class ListSelect : System.Web.UI.ListPage
    {
        public IList<IDictionary<string, object>> dataList;
        protected void Page_Load(object sender, EventArgs e)
        {
            string sqlId = Request.Params["listSqlId"];
            string paramString = Request.Params["params"];
            dataList = GetService().LoadData(sqlId, paramString);
        }

        private static TreeListSelectService GetService()
        {
            IObjectContainer container = App.ObjectContainer;
            TreeListSelectService service = container.GetObject<TreeListSelectService>("TreeListSelectService");
            return service;
        }
    }
}